package com.zzw.spring.aop;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class HelloHandler implements InvocationHandler{

	private Object target;

	public HelloHandler(Object target){
		this.target = target;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
		System.out.println("start");
		System.out.println("method name:" + method.getName());
		Object obj = method.invoke(target, args);
		return obj;
	}

}
